<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>spGpu library: Core Routines</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">spGpu library
   &#160;<span id="projectnumber">1.2.3</span>
   </div>
   <div id="projectbrief">spgpu</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Core Routines</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct should be modified only internally by spgpu  <a href="structspgpu_handle_struct.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga36e050ff0ebc2a3c31854957e3f85b39"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga36e050ff0ebc2a3c31854957e3f85b39">__host</a></td></tr>
<tr class="memdesc:ga36e050ff0ebc2a3c31854957e3f85b39"><td class="mdescLeft">&#160;</td><td class="mdescRight">__host pointers reference host allocations (it's just a placeholder)  <a href="#ga36e050ff0ebc2a3c31854957e3f85b39">More...</a><br /></td></tr>
<tr class="separator:ga36e050ff0ebc2a3c31854957e3f85b39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga208309018bbf41da4094eb99cf27210c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga208309018bbf41da4094eb99cf27210c">__device</a></td></tr>
<tr class="memdesc:ga208309018bbf41da4094eb99cf27210c"><td class="mdescLeft">&#160;</td><td class="mdescRight">__device pointers reference device allocations (it's just a placeholder)  <a href="#ga208309018bbf41da4094eb99cf27210c">More...</a><br /></td></tr>
<tr class="separator:ga208309018bbf41da4094eb99cf27210c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga738cd87f2695116dae7cdcb1c5033009"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga738cd87f2695116dae7cdcb1c5033009">SPGPU_SUCCESS</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga738cd87f2695116dae7cdcb1c5033009"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac78eb6660c2548c08d0b038ec1e10ebc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gac78eb6660c2548c08d0b038ec1e10ebc">SPGPU_UNSUPPORTED</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:gac78eb6660c2548c08d0b038ec1e10ebc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3113a429dcdd0e506b588f2791cbbcc6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga3113a429dcdd0e506b588f2791cbbcc6">SPGPU_UNSPECIFIED</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga3113a429dcdd0e506b588f2791cbbcc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga804344b9a14244b699ac3d900674b38b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga804344b9a14244b699ac3d900674b38b">SPGPU_OUTOFMEMORY</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga804344b9a14244b699ac3d900674b38b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga387e4a139242aa4eac70604cb9575e75"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga387e4a139242aa4eac70604cb9575e75">SPGPU_TYPE_INT</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga387e4a139242aa4eac70604cb9575e75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabba2587348d636e5f8778b4d746a53b5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabba2587348d636e5f8778b4d746a53b5">SPGPU_TYPE_FLOAT</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:gabba2587348d636e5f8778b4d746a53b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5edcbde8d535e04f2692ef990224e179"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga5edcbde8d535e04f2692ef990224e179">SPGPU_TYPE_DOUBLE</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga5edcbde8d535e04f2692ef990224e179"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3f2c326f3b40b15efe7b7eebee65b74a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga3f2c326f3b40b15efe7b7eebee65b74a">SPGPU_TYPE_COMPLEX_FLOAT</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga3f2c326f3b40b15efe7b7eebee65b74a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga872d3de18347fb15856c6991d23a1145"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga872d3de18347fb15856c6991d23a1145">SPGPU_TYPE_COMPLEX_DOUBLE</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:ga872d3de18347fb15856c6991d23a1145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc4e5bdeb8bba07f8ee5714f4b469104"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabc4e5bdeb8bba07f8ee5714f4b469104">cuFloatComplex_isZero</a>(a)&#160;&#160;&#160;(a.x == 0.0f &amp;&amp; a.y == 0.0f)</td></tr>
<tr class="separator:gabc4e5bdeb8bba07f8ee5714f4b469104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa6d0f03d203be83dfdebdcd5e55f6585"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaa6d0f03d203be83dfdebdcd5e55f6585">cuDoubleComplex_isZero</a>(a)&#160;&#160;&#160;(a.x == 0.0 &amp;&amp; a.y == 0.0)</td></tr>
<tr class="separator:gaa6d0f03d203be83dfdebdcd5e55f6585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8cd262e7cae13dce26878b1eeaaf97e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gae8cd262e7cae13dce26878b1eeaaf97e">cuFloatComplex_isNotZero</a>(a)&#160;&#160;&#160;(a.x != 0.0f || a.y != 0.0f)</td></tr>
<tr class="separator:gae8cd262e7cae13dce26878b1eeaaf97e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe811dd595c97b86791e4e07ae518328"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gabe811dd595c97b86791e4e07ae518328">cuDoubleComplex_isNotZero</a>(a)&#160;&#160;&#160;(a.x != 0.0 || a.y != 0.0)</td></tr>
<tr class="separator:gabe811dd595c97b86791e4e07ae518328"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga499c53ab7ac159a3ab6636ef11ddcb1a"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a></td></tr>
<tr class="memdesc:ga499c53ab7ac159a3ab6636ef11ddcb1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The return code for synchronous functions.  <a href="#ga499c53ab7ac159a3ab6636ef11ddcb1a">More...</a><br /></td></tr>
<tr class="separator:ga499c53ab7ac159a3ab6636ef11ddcb1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6403dea459dde9675081ba6a27577fc8"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a></td></tr>
<tr class="memdesc:ga6403dea459dde9675081ba6a27577fc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code to identify a primitive type.  <a href="#ga6403dea459dde9675081ba6a27577fc8">More...</a><br /></td></tr>
<tr class="separator:ga6403dea459dde9675081ba6a27577fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8eb1b903ee4c760010a1ab71e78595c8"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a></td></tr>
<tr class="memdesc:ga8eb1b903ee4c760010a1ab71e78595c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">this struct should be modified only internally by spgpu  <a href="#ga8eb1b903ee4c760010a1ab71e78595c8">More...</a><br /></td></tr>
<tr class="separator:ga8eb1b903ee4c760010a1ab71e78595c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d4825ac610d6524df843758da392dec"><td class="memItemLeft" align="right" valign="top">typedef const <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a></td></tr>
<tr class="memdesc:ga5d4825ac610d6524df843758da392dec"><td class="mdescLeft">&#160;</td><td class="mdescRight">A spGPU handle represents a single CUDA device on your platform.  <a href="#ga5d4825ac610d6524df843758da392dec">More...</a><br /></td></tr>
<tr class="separator:ga5d4825ac610d6524df843758da392dec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8ddfe4e902655f41b59f739c8b161d84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga8ddfe4e902655f41b59f739c8b161d84">spgpuCreate</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> *pHandle, int device)</td></tr>
<tr class="separator:ga8ddfe4e902655f41b59f739c8b161d84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5297b2482fc100ffe263503278ec187"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaf5297b2482fc100ffe263503278ec187">spgpuDestroy</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle)</td></tr>
<tr class="separator:gaf5297b2482fc100ffe263503278ec187"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a47a16ad6294b67fde76e71360cb9d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga4a47a16ad6294b67fde76e71360cb9d4">spgpuStreamCreate</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle, cudaStream_t *stream)</td></tr>
<tr class="separator:ga4a47a16ad6294b67fde76e71360cb9d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e6370e0f2c4040a1fd9e7092a9e933b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga2e6370e0f2c4040a1fd9e7092a9e933b">spgpuStreamDestroy</a> (cudaStream_t stream)</td></tr>
<tr class="separator:ga2e6370e0f2c4040a1fd9e7092a9e933b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d54bf94f7e8ed4d2004235d83cff6ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#ga7d54bf94f7e8ed4d2004235d83cff6ce">spgpuSetStream</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle, cudaStream_t stream)</td></tr>
<tr class="separator:ga7d54bf94f7e8ed4d2004235d83cff6ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea7f2e596694f5e8436a26cb86dee393"><td class="memItemLeft" align="right" valign="top">cudaStream_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaea7f2e596694f5e8436a26cb86dee393">spgpuGetStream</a> (<a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> pHandle)</td></tr>
<tr class="separator:gaea7f2e596694f5e8436a26cb86dee393"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3a379eb5f8a632897bcdfa6f3dff19d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__core_fun.html#gaa3a379eb5f8a632897bcdfa6f3dff19d">spgpuSizeOf</a> (<a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a> typeCode)</td></tr>
<tr class="separator:gaa3a379eb5f8a632897bcdfa6f3dff19d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga208309018bbf41da4094eb99cf27210c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __device</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>__device pointers reference device allocations (it's just a placeholder) </p>

</div>
</div>
<a class="anchor" id="ga36e050ff0ebc2a3c31854957e3f85b39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __host</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>__host pointers reference host allocations (it's just a placeholder) </p>

</div>
</div>
<a class="anchor" id="gabe811dd595c97b86791e4e07ae518328"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuDoubleComplex_isNotZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x != 0.0 || a.y != 0.0)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="gaa6d0f03d203be83dfdebdcd5e55f6585"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuDoubleComplex_isZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x == 0.0 &amp;&amp; a.y == 0.0)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="gae8cd262e7cae13dce26878b1eeaaf97e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuFloatComplex_isNotZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x != 0.0f || a.y != 0.0f)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="gabc4e5bdeb8bba07f8ee5714f4b469104"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cuFloatComplex_isZero</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;(a.x == 0.0f &amp;&amp; a.y == 0.0f)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga804344b9a14244b699ac3d900674b38b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_OUTOFMEMORY&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga738cd87f2695116dae7cdcb1c5033009"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_SUCCESS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga872d3de18347fb15856c6991d23a1145"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_COMPLEX_DOUBLE&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga3f2c326f3b40b15efe7b7eebee65b74a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_COMPLEX_FLOAT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga5edcbde8d535e04f2692ef990224e179"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_DOUBLE&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="gabba2587348d636e5f8778b4d746a53b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_FLOAT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga387e4a139242aa4eac70604cb9575e75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_TYPE_INT&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga3113a429dcdd0e506b588f2791cbbcc6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_UNSPECIFIED&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="gac78eb6660c2548c08d0b038ec1e10ebc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPGPU_UNSUPPORTED&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga5d4825ac610d6524df843758da392dec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef const <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a>* <a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A spGPU handle represents a single CUDA device on your platform. </p>

</div>
</div>
<a class="anchor" id="ga8eb1b903ee4c760010a1ab71e78595c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structspgpu_handle_struct.html">spgpuHandleStruct</a>  <a class="el" href="group__core_fun.html#ga8eb1b903ee4c760010a1ab71e78595c8">SpgpuHandleStruct</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>this struct should be modified only internally by spgpu </p>

</div>
</div>
<a class="anchor" id="ga499c53ab7ac159a3ab6636ef11ddcb1a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int <a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The return code for synchronous functions. </p>

</div>
</div>
<a class="anchor" id="ga6403dea459dde9675081ba6a27577fc8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int <a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Code to identify a primitive type. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga8ddfe4e902655f41b59f739c8b161d84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__core_fun.html#ga499c53ab7ac159a3ab6636ef11ddcb1a">spgpuStatus_t</a> spgpuCreate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a> *&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>device</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a spgpu context for a GPU device. Every call to spgpu routines using this handle will execute on the same GPU. This is re-entrant, so it will work if used by multiple host threads. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>outputs the handle </td></tr>
    <tr><td class="paramname">device</td><td>id of the device to be used by this context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf5297b2482fc100ffe263503278ec187"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuDestroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy the spgpu context for pHandle. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle previously created with <a class="el" href="group__core_fun.html#ga8ddfe4e902655f41b59f739c8b161d84">spgpuCreate()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaea7f2e596694f5e8436a26cb86dee393"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cudaStream_t spgpuGetStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the current stream from the handle pHandle. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle from which get the stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7d54bf94f7e8ed4d2004235d83cff6ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuSetStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cudaStream_t&#160;</td>
          <td class="paramname"><em>stream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Change the current stream for the handle pHandle. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pHandle</td><td>the handle to configure. </td></tr>
    <tr><td class="paramname">stream</td><td>the stream to use for next spgpu routines call. Use 0 to reset to the default stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa3a379eb5f8a632897bcdfa6f3dff19d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t spgpuSizeOf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga6403dea459dde9675081ba6a27577fc8">spgpuType_t</a>&#160;</td>
          <td class="paramname"><em>typeCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the size, in bytes, of the type denoted by typeCode (e.g. 4 for SPGPU_TYPE_FLOAT, 8 for SPGPU_TYPE_DOUBLE). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">typeCode</td><td>outputs the handle </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4a47a16ad6294b67fde76e71360cb9d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuStreamCreate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__core_fun.html#ga5d4825ac610d6524df843758da392dec">spgpuHandle_t</a>&#160;</td>
          <td class="paramname"><em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cudaStream_t *&#160;</td>
          <td class="paramname"><em>stream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a cuda stream according to the device of the spgpu handle. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>outputs the new stream </td></tr>
    <tr><td class="paramname">pHandle</td><td>the handle used to obtain the device id for the stream </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2e6370e0f2c4040a1fd9e7092a9e933b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void spgpuStreamDestroy </td>
          <td>(</td>
          <td class="paramtype">cudaStream_t&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy a stream, previously created with <a class="el" href="group__core_fun.html#ga4a47a16ad6294b67fde76e71360cb9d4">spgpuStreamCreate()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>the stream to destroy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 12 2015 23:59:25 for spGpu library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
